package com.itheima.service;

import com.itheima.po.Account;

/**
 * ClassName:AccountService
 * Package:com.itheima.service
 * Description:
 * Date:2020/2/2923:00
 * User: snow
 */
public interface AccountService {
	/**
	 * 根据id查找账户
	 *
	 * @param accountId
	 */
	Account findAccountById(Integer accountId);

	/**
	 * 根据name查找账户
	 *
	 * @param accountName
	 */
	Account findAccountByName(String accountName);

	/**
	 * 更新账户
	 *
	 * @param account
	 */
	void updateAccount(Account account);

	/**
	 * 转账
	 * @param sourceName
	 * @param targetName
	 * @param money
	 */
	void transfer(String sourceName, String targetName, Float money);

}
